
function dxde = dxde_leo(var , aux)

mu = aux.EMRot.mu;
rMag = var(1);
alpha = var(2);
beta = var(3);
temp = var(4);

dxde = [ cos(alpha),  -rMag*sin(alpha),  0, 0;
    sin(alpha), rMag*cos(alpha), 0, 0;
    sin(alpha) - (beta*sin(alpha)*(mu - 1))/(2*rMag^2*(-(mu - 1)/rMag)^(1/2)), rMag*cos(alpha) - beta*cos(alpha)*(-(mu - 1)/rMag)^(1/2), -sin(alpha)*(-(mu - 1)/rMag)^(1/2), 0;
    (beta*cos(alpha)*(mu - 1))/(2*rMag^2*(-(mu - 1)/rMag)^(1/2)) - cos(alpha), rMag*sin(alpha) - beta*sin(alpha)*(-(mu - 1)/rMag)^(1/2),  cos(alpha)*(-(mu - 1)/rMag)^(1/2), 0];

end